<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: 10669
  Date: 2021/7/27
  Time: 11:33
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <%
        //获取项目的根路径
        String path = request.getContextPath();
        String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
    %>
    <title>Title</title>
    <script src="<%=basePath%>/static/js/jquery-1.12.4.js"></script>
    <style type="text/css">

        ul li{
            list-style: none;
        }
       .y{
            border: 1px solid red;
            width: 500px;
            height: 300px;
           position: absolute;
           left: 150px;
           top: 50px;
           /*background-color: white;*/


        }
    </style>
</head>
<body>
卡号：${card}&nbsp; <a href="login" >退出登录</a>

<ul>
    <li>
        <a href="money?cardNo=${card}">查询余额
            <c:if test="${money!=null}">
                <div class="y">
                    <h1>您的余额是:￥${money}</h1>
                </div>
            </c:if>
        </a>
    </li>
    <li>
        <a href="zz">转账 </a>
            <c:if test="${zz!=null}">
                <div class="y">
                    <form action="zz" method="post">
                        <input type="text" value="${card}" name="cardNo" style="display: none">
                        请输入要转入的账号：<input type="text" name="zzcard"><br>
                        请输入要转入的金额：<input type="text" name="money">
                        <input type="submit" value="确定">
                    </form>
                </div>
                <c:if test="${zz==1}">
                    <script>
                        setTimeout("alert('转账成功')",200)

                    </script>
                </c:if>
                <c:if test="${zz==2}">
                    <script>
                        setTimeout("alert('卡号不存在')",200)

                    </script>
                </c:if>
            </c:if>

    </li>
    <li>
        <a href="jy?cardNo=${card}">查看交易记录</a>
                <c:if test="${jy!=null}">
                    <div class="y">
                        <table border="1">
                            <tr>
                                <td>序号</td>
                                <td>卡号</td>
                                <td>交易时间</td>
                                <td>交易金额</td>
                                <td>账户余额</td>
                                <td>交易类型</td>
                                <td>备注</td>
                            </tr>
                            <c:forEach items="${jy}" var="jy">
                                <tr>
                                    <td>${jy.id}</td>
                                    <td>${jy.cardNo}</td>
                                    <td>${jy.transactionDate}</td>
                                    <td>${jy.transactionAmount}</td>
                                    <td>${jy.balance}</td>
                                    <td>${jy.transactionType}</td>
                                    <td>${jy.remark}</td>
                                </tr>
                            </c:forEach>
                        </table>
                    </div>
                </c:if>
    </li>
    <li>
        <a href="up">修改密码 </a>
            <c:if test="${up!=null}">
                <div class="y">
                    <form action="up" method="post">
                        <input type="text" name="cardNo" value="${card}" style="display: none">
                        请输入原密码:<input type="password"><br>
                        请输入新密码:<input type="password" name="newpwd"><br>
                        <input type="submit">
                    </form>
                </div>
            </c:if>


    </li>
</ul>


<script type="text/javascript">
    $(function (){
    })
</script>


</body>
</html>
